class Seiso::ImportMaster
  # Author:: Willie Wheeler
  # Copyright:: Copyright (c) 2014-2016 Expedia, Inc.
  # License:: Apache 2.0
  class Mappers::RegionMapper

    def initialize(resolver)
      @resolver = resolver
    end

    def map(doc_region, context)
      {
        'key' => doc_region['key'],
        'name' => doc_region['name'],
        'regionKey' => doc_region['regionKey'],
        'infrastructureProvider' => @resolver.item_uri('infrastructureProviders', doc_region['infrastructureProvider'])
      }
    end
  end
end
